<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
    <style>
        .box{
            width:200px;
            height:200px;
            background: rgb(134, 97, 97);
        }
        
    </style>
</head>
<body>
    <div id="app">
       <ul>
           <li v-for="person in persons">
                <p>
                    姓名:{{ person.name }}
                </p>
                <p>
                    年龄:{{ person.age }}
                </p>
                <p>
                    性别：
                    {{person.gender === 0?'男':'女'  }}
                </p>
                <div>
                    爱好：
                        <span v-for="hobby in person.hobbies">
                            {{hobby}}
                        </span>
                </div>
           </li>
       </ul>
    </div>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{
               persons:[
                   {
                       name:"小明",
                       age:18,
                       gender:0,
                       hobbies:['音乐','电影','篮球']
                   },
                   {
                       name:"小红",
                       age:19,
                       gender:1,
                       hobbies:['唱歌','跳舞','rap']
                   },
                   {
                       name:"小美",
                       age:17,
                       gender:1,
                       hobbies:['化妆','吃','睡']
                   }
               ]
            }
        })
    </script>
</body>
</html>